﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfShopRateMana.aspx.cs" Inherits="msBsc.WebUi.wfShopRateMana" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server">
    <title>卖家评价管理</title>
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/??themes/Style1/StyleQt.css,themes/Style1/cRateInd.css" />
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,jqPlugin/layer/layer.min.js,jqPlugin/laydate/laydate.js"
        type="text/javascript"></script>
    <!--head fix rgn-->
    <script type="text/javascript">
        $(window).load(function () {
            $(".tm-m-photos-thumb li").live("click", function () {
                var $self = $(this);
                if ($self.hasClass("tm-current")) {
                    $self.parent().next().hide();
                    $self.removeClass("tm-current");
                } else {
                    $self.parent().next().show();
                    $self.prevAll().removeClass("tm-current");
                    $self.nextAll().removeClass("tm-current");
                    $self.addClass("tm-current");
                    $self.parent().next().find(" img").attr("src", $self.find(" img").attr("src"));
                    var htem3 = $self.parent().next().find(" img").height();
                    var wtem3 = $self.parent().next().find(" img").width();
                    if (parseInt(htem3.toString().replace('px', '')) < 250) {
                        $self.parent().next().height(htem3);
                    } else {
                        $self.parent().next().height("250px");
                    }
                    if (parseInt(wtem3.toString().replace('px', '')) < 250) {
                        $self.parent().next().width(wtem3);
                    } else {
                        $self.parent().next().width("250px");
                    }
                }
            });
        });
        function doRateToPageNm(_pNum) {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "doFinderRateList");

            _jsParam.AddCell("GOODS_NME", $("#txtGOODS_NME").val());
            _jsParam.AddCell("USER_NME", $("#txtUSER_NME").val());
            _jsParam.AddCell("NEW_PAGE_NUM", _pNum || $("#Ratecurrpage").val());
            _jsParam.AddCell("PAGE_ROW_COUNT", "20");
            _jsParam.AddCell("PAGE_ROW_SORT", "");

            ajaxComm(_jsParam);
        };

        function updateRateTableHtml(_data) {
            var tpl = HtmlUtil.htmlDecode(document.getElementById('rate_list_temp').innerHTML);
            laytpl(tpl).render(_data, function (render) {
                $("#ratetbody").empty().append(render);
            });
            $("#Ratecurrpage").val(_data.page);
            createPaging('ratepaginator', _data.page, _data.total, function (_topagenum) { doRateToPageNm(_topagenum); });

        };

         
        function doSellerReply() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "doSellerReply");
            _jsParam.AddCell("ORDER_LIST_ID", $("#txtORDER_LIST_ID").val());
            _jsParam.AddCell("SELLER_REPLY1", $("#txtSELLER_REPLY1").val());
            ajaxComm(_jsParam);
        };
        var layerform;
        function ShowForm(slid) {
            $("#txtORDER_LIST_ID").val(slid);
            layerform && layer.close(layerform);
            layerform = $.layer({
                type: 1,
                shade: [0],
                fix: true,
                title: '输入回复信息',
                maxmin: false,
                page: { dom: '#J_FormBox' },
                area: ['610px', '410px']
            });
        };
    </script> 
</head>
<body>
    <input type="hidden" id="Ratecurrpage" value="1">
    <div id="mallPage" class="tms-page mallAct tmall-  page-not-market">
        <!-- -->
        <!--商城通用顶通-->
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderTopHtml()%>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderLogoDealerHtml("商户管理")%>
        <div id="content" class="content" style=" padding-top: 3px;">
            <div class="page lang-zh-S">
                <div id="mytaobao-panel" class="grid-c2">
                    <div class="col-main" id="J_Col_Main" style="padding-bottom: 0;">
                        <div class="bought">
                            <div class="main-wrap"> 
                                <h2 class="h2-single">
                                    <span class="entity" id="J_DeliverTitle">查询条件</span></h2> 
            <div id="divCondition" style="margin: 3px; border-style: solid; border-width: 0px;
                border-color: #C8D2E0; background-color:#fff; padding:3px; font-size:14px;">
                <table border="0" cellpadding="0" cellspacing="0" style="float:right;"> 
                    <tr>
                        <td width="100px" align="right" style=" padding-right:5px;">
                            评价时间起 </td>
                        <td align="right" width="110px">
                            <input class="" id="txtINITIAL_DT_S" type="text" value="" style="width:100px;height:24px;" onclick="laydate()"/>
                        </td> 
                        <td class="label" width="100px" align="right" style=" padding-right:5px;">
                            评价时间止 </td>
                        <td class="label" width="100px" align="right">
                           <input class="" id="txtINITIAL_DT_E" type="text" value="" style="width:100px;height:24px;" onclick="laydate()"/>
                        </td> 
                        <td width="100px" align="right" style=" padding-right:5px;">
                            商品名称 </td>
                        <td align="right" width="110px">
                            <input class="" id="txtGOODS_NME" type="text" value="" style="width:100px;height:24px;"/>
                        </td> 
                        <td class="label" width="90px" align="right" style=" padding-right:5px;">
                            买家帐号 </td>
                        <td class="label" width="100px" align="right">
                           <input class="" id="txtUSER_NME" type="text" value="" style="width:100px;height:24px;"/>
                        </td> 
                        <td align="center" style=" padding-left:20px;">
                           
                        <input class="btn btn-mini btn-danger" id="btnFinder"  type="button" onclick="javascript:doRateToPageNm();return false;" value="查询"/>
                        
                                </td>
                    </tr>
                </table>
                <div style="clear:both;"></div>
            </div>
                                <div class="form-box" id="J_FormBox" style="width:auto;display:none;"> 
                                    <div class="item item-title">
                                        <span class="item-label">回复内容： </span>(可以输入500个字符，一个汉字等于2个字符) 
                                    </div>
                                    <div class="item " id="J_ItemStreet"> 
                                        <div class="ks-combobox" id="J_ComboboxStreet">
                                            <div class="ks-combobox-input-wrap">
                                                <textarea class="ks-combobox-input i-ta" id="txtSELLER_REPLY1" style="height:300px;width:600px;"></textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="item" style="width:auto; text-align:center; padding:3px;"> 
                                        <button type="button" class="btn" onclick="doSellerReply();" style=" margin-left:10px;">
                                            保存</button>
                                    </div>
                                    <input id="txtORDER_LIST_ID" type="text" value="" style="display: none;" /> 
                                </div>
                                <h2 class="h2-single">
                                    <span class="entity"  >来自买家的评价列表</span></h2> 
                                <div class="tbl-deliver-address" style=" background-color:#fff;"> 
                                <div class="rate-grid">
                                                <table id="ratetbody">
                                                </table>
                                            </div>
                                            <div id="ratepaginator">
                                            </div>

                                </div>
                            </div>
                            <span class="mytaobao-rc-bt"><span></span></span>
                        </div>
                    </div>
                    <!-- end col-main -->
                    <div class="col-sub" id="J_Col_Sub">
                        <%=new msBsc.WebUi.Code.QtHtmlGet().GetDealerMenu()%>
                    </div>
                    <div style="clear:both;"></div>
                </div>
                <!-- end mytaobao-panel -->
            </div>
        </div>

        
    <!-- template -->
    <textarea id="rate_list_temp" style="display: none;">  
        <tbody>
                <tr style=" text-align:center; font-weight:bold;">
                    <td class="col-author" style="width:160px;"> 
                    出售的商品
                    </td>
                    <td class="tm-col-master" style="width:auto;"> 
                    评价内容
                    </td>
                    <td class="col-author" style="width:80px;"> 
                    型号/规格
                    </td>
                    <td class="col-meta" style="width:80px;"> 
                    评价结果
                    </td>
                    <td class="col-author" style="width:80px;"> 
                    买家
                    </td>
                    <td class="col-author" style="width:80px;"> 
                    操作
                    </td>
                </tr>
        {{# if(d.rows.length == 0){ }} 
     <div class="no-result-box layout-center"> 
       没有评价信息。
       </div> 
          {{#} else {}}   {{# for(var i = 0, len = d.rows.length; i < len; i++){ }}
            
                <tr>
                    <td class="col-author" style="text-align:center;width:160px;">

    <div class="item-rate-info" style=" padding:2px;">
        <div class="item-detail">
            <a href="/c_GoodsView.htm?ID={{ d.rows[i].GOODS_ID }}" target="_blank" class="item-d-img">
                                        {{# if(d.rows[i].IMG_URL!=''){}}
                <img src="{{ d.rows[i].IMG_URL }}" style="width:130px;height:130px;"> 
                                        {{#}}}
            </a>
            <div class="item-title">
                <a href="/c_GoodsView.htm?ID={{ d.rows[i].GOODS_ID }}" style="color:#36c;" target="_blank" title="{{ d.rows[i].GOODS_NME }}">{{ d.rows[i].GOODS_NME }}</a>
            </div>
        </div>
    </div>
                    </td>
                    <td class="tm-col-master" style="width:auto;">
                        <div class="tm-rate-premiere">
                            <div class="tm-rate-tag">
                                <div class="tm-rate-title">
                                    初次评价:</div>
                                <div class="tm-rate-date">
                                    {{ d.rows[i].BUYER_RATE_DT1 }}</div>
                            </div>
                            <div class="tm-rate-content">
                                <div class="tm-rate-fulltxt">
                                    {{ d.rows[i].BUYER_RATE_DESC1 }}</div>
                                {{# if(d.rows[i].GOODS_IMG_URL1!=''){}}
                                <div class="tm-m-photos">
                                    <ul class="tm-m-photos-thumb">

                                        {{# if(d.rows[i].GOODS_IMG_URL1!=''){}}
                                        <li><img src="{{ d.rows[i].GOODS_IMG_URL1 }}"><b class="tm-photos-arrow"></b></li>
                                        {{#}}}
                                        {{# if(d.rows[i].GOODS_IMG_URL2!=''){}}
                                        <li><img src="{{ d.rows[i].GOODS_IMG_URL2 }}"><b class="tm-photos-arrow"></b></li>
                                        {{#}}}
                                        {{# if(d.rows[i].GOODS_IMG_URL3!=''){}}
                                        <li><img src="{{ d.rows[i].GOODS_IMG_URL3 }}"><b class="tm-photos-arrow"></b></li>
                                        {{#}}}
                                        {{# if(d.rows[i].GOODS_IMG_URL4!=''){}}
                                        <li><img src="{{ d.rows[i].GOODS_IMG_URL4 }}"><b class="tm-photos-arrow"></b></li>
                                        {{#}}}
                                        {{# if(d.rows[i].GOODS_IMG_URL5!=''){}}
                                        <li><img src="{{ d.rows[i].GOODS_IMG_URL5 }}"><b class="tm-photos-arrow"></b></li>
                                        {{#}}}
                                    </ul>
                                    <div class="tm-m-photo-viewer" style="width: 1px; height: 1px; display: none;">
                                        <img src="data:image/png;base64," style="width: 256px; max-height: 256px; "></div>
                                </div>
                                {{#}}}
                            </div>
                            {{# if(d.rows[i].SELLER_REPLY1!=''){}}
                            <div class="tm-rate-reply">
                                <div class="tm-rate-fulltxt">
                                    卖家回复：{{ d.rows[i].SELLER_REPLY1 }}</div>
                            </div>
                            {{#}}}
                        </div>
                        {{# if(d.rows[i].BUYER_RATE_DESC2!=''){}}
                        <div class="tm-rate-append">
                            <div class="tm-rate-tag">
                                <div class="tm-rate-title">
                                    <span class="tm-rate-daydiff">追加：</span></div>
                                <div class="tm-rate-date">
                                {{ d.rows[i].BUYER_RATE_DT2 }}
                                </div>
                            </div>
                            <div class="tm-rate-content">
                                <div class="tm-rate-fulltxt">
                                    {{ d.rows[i].BUYER_RATE_DESC2 }}</div>
                            </div>
                            <s></s>
                        </div>
                        {{# }}}
                        <br />
                        <br />
                    </td>
                    <td class="col-author" style="text-align:center;width:80px;">
                        <div class="rate-user-info">
                            <a target="_self" href="#">{{ d.rows[i].NORMS_DESC }}</a></div>
                        <div class="rate-user-grade"> </div>
                    </td>
                    <td class="col-meta" style="text-align:center;width:80px;">
                        <div class="rate-user-profile">
                        {{# if(d.rows[i].BUYER_RATE_NUM=='1'){}}
                              <i class="icon icon-rank icon-good" title="好评"></i> <span>好评</span>
                        {{# }}}
                        {{# if(d.rows[i].BUYER_RATE_NUM=='0'){}}
                              <i class="icon icon-rank icon-normal" title="中评"></i> <span>中评</span>
                        {{# }}}
                        {{# if(d.rows[i].BUYER_RATE_NUM=='-1'){}}
                              <i class="icon icon-rank icon-bad" title="差评"></i> <span>差评</span>
                        {{# }}}
                             
                        </div>
                        <div class="rate-sku">
                        </div>
                    </td>
                    <td class="col-author" style="text-align:center;width:80px;">
                        <div class="rate-user-info">
                            <a target="_self" href="#">{{ d.rows[i].USER_NME }}</a></div>
                        <div class="rate-user-grade"> </div>
                    </td>
                    <td class="col-author" style="text-align:center;width:80px;">

                    <div style=" padding:3px;">
                 <a href="/d_ShopOrderRate.htm?ID={{ d.rows[i].ORDER_FORM_ID }}" target="_blank" class="J_Rate J_MakePoint tm-btn tm-skin-white" >评价买家</a>
                    </div>
                    {{#if(d.rows[i].SELLER_REPLY_DT1==''){}}
                    <div style=" padding:3px;">
                            <input class="btn   btn-primary" type="button" onclick="javascript:ShowForm('{{ d.rows[i].ORDER_LIST_ID }}');return false;" value="回复"
                                id="Button2"  /> 
                    </div>
                    {{#}}}

                    </td>
                </tr>


            {{# } }}  {{# }}}
            </tbody>
        </textarea>


        <%=new msBsc.WebUi.Code.QtHtmlGet().GetFloorHtml()%>
    </div>
    <!-- foot script -->
</body>
</html>
